<template>
  <div class="bg-white rounded-lg p-5 h-full flex flex-col">
    <div class="font-bold text-xl mb-4">{{ orgInfo.enterpriseName }}</div>
    <el-scrollbar>
      <div class="flex mb-4">
        <div></div>
        <div>{{ orgInfo.categoryListName }}</div>
        <div>{{orgInfo.scoring}}分</div>
      </div>
      <el-descriptions border :column="2">
        <el-descriptions-item label="所在镇/街道" :span="2">{{
          orgInfo.town
        }}</el-descriptions-item>
        <el-descriptions-item label="执业范围" :span="2">{{
          hospitalInfo.practiceScope
        }}</el-descriptions-item>
        <el-descriptions-item label="诊疗科目" :span="2">{{
          hospitalInfo.diagnosisSubject
        }}</el-descriptions-item>
        <el-descriptions-item label="详细地址" :span="2">
          {{ orgInfo.addr }}
        </el-descriptions-item>
        <el-descriptions-item label="医生人数">
          {{ hospitalInfo.physicianNum }}
        </el-descriptions-item>
        <el-descriptions-item label="护士人数">
          {{ hospitalInfo.nurseNum }}
        </el-descriptions-item>
      </el-descriptions>
      <div class="my-4 font-bold text-lg">证件信息</div>
      <div class="grid grid-cols-3 space-y-1">
        <div>有效期：{{ orgInfo.sanitaryPermitDate }}</div>
        <div>
          有效期：{{ hospitalInfo.recordStart }} - {{ hospitalInfo.recordEnd }}
        </div>
        <div>
          有效期：{{ hospitalInfo.medicalLicenseStart }} -
          {{ hospitalInfo.medicalLicenseEnd }}
        </div>
        <img class="w-40" :src="orgInfo.businessLicense" alt="" />
        <img class="w-40" :src="hospitalInfo.recordCertificates" alt="" />
        <img class="w-40" :src="hospitalInfo.medicalLicense" alt="" />
        <div>营业执照</div>
        <div>诊所备案证</div>
        <div>医疗机构执业许可证</div>
      </div>
      <hr class="my-4" />
    
      <Staff></Staff>
      <hr class="my-4" />
      <div class="mb-4 font-bold text-lg">日常检查任务记录</div>
      <DailyInspect></DailyInspect>
      <div class="my-4 font-bold text-lg">抽查任务记录</div>
      <SpotInspect></SpotInspect>
      <div class="my-4 font-bold text-lg">双随机公开任务记录</div>
      <RandomInspect></RandomInspect>
      <div class="my-4 font-bold text-lg">监督文书下发记录</div>
      <Document></Document>
      <hr class="my-4" />
      <div>
        <el-button type="primary" @click="goBack">返回</el-button>
      </div>
    </el-scrollbar>
  </div>
</template>

<script>
import { getHospitalDetailAPI } from "@/api/zhangping/health-care/base-info.js";
import DailyInspect from "./components/daily-inspect.vue";
import RandomInspect from "./components/random-inspect.vue";
import SpotInspect from "./components/spot-inspect.vue";
import Document from "./components/document.vue";
import Staff from './components/staff'
export default {
  name: "",
  mixins: [],
  components: { DailyInspect, RandomInspect, SpotInspect, Document,Staff },
  props: {},
  data() {
    return {
      hospitalInfo: {},
      orgInfo: {},

      tableData: [],
    };
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {
    this.getInfo();
  },
  methods: {
    getInfo() {
      console.log(this.$route);

      const creditCode = this.$route.query.creditCode;

      getHospitalDetailAPI({ creditCode }).then((res) => {
        console.log(res);
        if (res.code === 200) {
          this.orgInfo = res.data.zpEnterpriseInfo;
          this.hospitalInfo = res.data.zpMedicalOrg;
        }
      });
    },

    goBack() {
      this.$router.back();
    },
    toDocDetailPage() {},
  },
};
</script>

<style scoped lang="scss"></style>
